package com.totsp.conference;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Vibrator;
import android.view.Menu;
import android.view.MenuItem;

public class ConfActivity extends Activity {

	private static final int MENU_LIST_PRES = 0;
	private static final int MENU_LIST_SPKRS = 1;
	private static final int MENU_ABOUT = 2;

	protected Vibrator vibe;
	
	protected DevNexusApp app;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		vibe = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
		app = (DevNexusApp) getApplication();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		menu.add(0, ConfActivity.MENU_LIST_PRES, 0, "Pres List").setIcon(
				android.R.drawable.ic_menu_agenda);
		menu.add(0, ConfActivity.MENU_LIST_SPKRS, 1, "Speaker List").setIcon(
				android.R.drawable.ic_menu_slideshow);
		menu.add(0, ConfActivity.MENU_ABOUT, 2, "About").setIcon(
				android.R.drawable.ic_menu_info_details);
		return super.onCreateOptionsMenu(menu);
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case MENU_LIST_PRES:
			startActivity(new Intent(ConfActivity.this, PresentationList.class));
			return true;
		case MENU_LIST_SPKRS:
			startActivity(new Intent(ConfActivity.this, SpeakerList.class));
			return true;
		case MENU_ABOUT:
			startActivity(new Intent(ConfActivity.this, About.class));
			return true;
		}
		return super.onOptionsItemSelected(item);
	}
}